# Contributor: Martin Schmidt <martin.schmidt13@gmx.de>
# Maintainer: Martin Schmidt <martin.schmidt13@gmx.de>
pkgname=openh264
pkgver=2.1.1
pkgrel=0
options="!check"
pkgdesc="OpenH264 is a codec library which supports H.264 encoding and decoding"
url="https://github.com/cisco/openh264"
arch="all"
license="BSD-2-Clause"
makedepends="nasm"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/cisco/openh264/archive/v$pkgver.tar.gz"

build() {
	case "$CARCH" in
		x86)
			export CFLAGS="$CFLAGS -DX86_32_PICASM"
			export CXXFLAGS="$CXXFLAGS -DX86_32_PICASM"
			export ASMFLAGS="$ASMFLAGS -DX86_32_PICASM"
			;;
	esac
	make
}

package() {
	make DESTDIR="$pkgdir" PREFIX="/usr" install
}

sha512sums="f9c2925fa902c6278da40f68b967d25e62db7ce3541e8f5e7a0ee174204b6ecc7026b5853885c361f48ca01d71bacd585fb5b91f01f0c054ece80943f1afcf79  openh264-2.1.1.tar.gz"
